import React from 'react';
import {
    View,
    Text,
    TouchableOpacity,
    StyleSheet,
    Linking
} from 'react-native';
import NavigationUtil from '../../navigator/NavigationUtil'
import {screen} from '../../public/common';
export default class RecommendView extends React.Component {
    open=()=>{
        let url = 'https://licai.suning.com/lcportal/app/index.htm?utm_source=wechat&utm_medium=yfb&utm_campaign=40_12&channelCode=H5_YFBWECHAT&from=singlemessage&isappinstalled=0';
        Linking.openURL(url)
    }
    render() {
        const {applyData} = this.props;
        return (
        <View style={styles.RecommendView}>
            <View style={styles.content}>
                <Text style={styles.text}>借款金额（元）</Text>
                <Text style={styles.textNum}>{applyData?applyData.scope:'***'}</Text>
                <TouchableOpacity style={styles.vbutton} onPress={this.open}>
                    {/* onPress={()=>{
                        // NavigationUtil.goPage({item:applyData},'LoanDetail')
                    }}
                > */}
                    <Text style={styles.vtext} >点击申请</Text>
                </TouchableOpacity>
            </View>
        </View>)
    }
}
const styles = StyleSheet.create({
    RecommendView:{
        width:screen.width,
    },
    content:{ //阴影
        width:screen.width-40,
        marginLeft:20,
        backgroundColor: "#fff",
        alignItems: 'center',
        marginTop: 20,

        shadowColor:'#776f6f',
        shadowOffset:{h:10,w:10},
        shadowOpacity:0.8,
        shadowRadius:3,
        //注意：这一句是可以让安卓拥有灰色阴影
        elevation: 4,
        paddingTop: 10,
        paddingBottom: 10,
        borderRadius: 10,
    },
    text: {
        fontSize: 14,
        textAlign:'center'
    },
    textNum:{
        fontSize:22,
        marginTop:15
    },
    vbutton:{
        backgroundColor:'#ff5637',
        width:110,
        height:35,
        borderRadius: 10,
        justifyContent:'center',
        marginTop:15
    },
    vtext:{
        color:'#fff',
        textAlign:'center',
        fontSize:15,
    }
});